package com.zhijian.medical.entity.vo.response;

import com.zhijian.medical.enums.AssessmentPersonStatusEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

/**
 * 考核-试卷-人员关系表 回显vo
 *
 * @author HCG
 * @version 1.0
 * @date 2023-02-02 14:45:42
 */
@Getter
@Api(tags = "考核-试卷-人员关系表回显vo")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AssessmentPaperPersonVo implements Serializable {

    private static final long serialVersionUID = -1;

    /**
     * 主键id
     */
    @ApiModelProperty("主键id")
    private Long id;

    /**
     * 试卷id
     */
    @ApiModelProperty("试卷id")
    private Long assessmentPaperId;

    /**
     * 做卷人id
     */
    @ApiModelProperty("做卷人id")
    private Long userId;

    /**
     * 人员名称
     */
    @ApiModelProperty("人员名称")
    private String userName;

    /**
     * 状态，0：未提交，1：已提交，2：已作废，3：已打分
     */
    @ApiModelProperty("状态，0：未提交，1：已提交，2：已作废，3：已打分")
    private Byte status;

    /**
     * 状态字符串
     */
    @ApiModelProperty("状态字符串")
    private String statusStr;

    /**
     * 总分数
     */
    @ApiModelProperty("总分数")
    private Integer score;

    /**
     * 题库部分分数
     */
    @ApiModelProperty("题库部分分数")
    private Integer tkScore;

    /**
     * 数字切片部分分数
     */
    @ApiModelProperty("数字切片部分分数")
    private Integer dscScore;
    /**
     * 结果，例如：合格，不合格
     */
    @ApiModelProperty("结果，例如：合格，不合格")
    private String result;

    /**
     * 考核id
     */
    @ApiModelProperty("考核id")
    private Long assessmentId;

    /**
     * 提交时间
     */
    @ApiModelProperty("提交时间")
    private String submitTime;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    private String updateTime;

    public void setTkScore(Integer tkScore) {
        this.tkScore = tkScore;
    }

    public void setDscScore(Integer dscScore) {
        this.dscScore = dscScore;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setAssessmentPaperId(Long assessmentPaperId) {
        this.assessmentPaperId = assessmentPaperId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setStatus(Byte status) {
        this.status = status;
        if (Objects.isNull(this.status)) {
            this.statusStr = null;
            return;
        }
        AssessmentPersonStatusEnum anEnum = AssessmentPersonStatusEnum.getByCode(Integer.valueOf(this.status));
        this.statusStr = Objects.nonNull(anEnum) ? anEnum.getDesc() : null;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public void setAssessmentId(Long assessmentId) {
        this.assessmentId = assessmentId;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public void setStatusStr(String statusStr) {

    }
}